home *** CD-ROM | disk | FTP | other *** search
- on playmysmmovie moviesymbol, palcastname, palname, horiz, vert, inflag, mouselockcheck
- global gSmackerObject
- set the soundKeepDevice to 0
- puppetSound("silencex")
- updateStage()
- set t to the timer + 10
- repeat while the timer < t
- end repeat
- puppetSound(0)
- updateStage()
- set myreturn to 0
- if not objectp(gSmackerObject) then
- set gSmackerObject to new(xtra("smacker"))
- end if
- if voidp(moviesymbol) then
- set myfile to new(xtra("fileio"))
- set myfilename to displayOpen(myfile)
- else
- set smmovieinfo to FindsmMoviename(moviesymbol)
- if not voidp(smmovieinfo) then
- set myfilename to getAt(smmovieinfo, 1)
- set myred to getAt(smmovieinfo, 2)
- set mygreen to getAt(smmovieinfo, 3)
- set myblue to getAt(smmovieinfo, 4)
- else
- set myfilename to VOID
- end if
- end if
- set killmeflag to 0
- if not voidp(myfilename) then
- if not (inflag = #notrans) then
- set res to SmackOpenTrans(gSmackerObject, myfilename, 1, 0, myred, mygreen, myblue)
- else
- set res to SmackOpen(gSmackerObject, myfilename, 1, 0)
- end if
- if not voidp(horiz) and not voidp(vert) then
- SmackSetPosition(gSmackerObject, horiz, vert)
- end if
- if res = 0 then
- set res to SmackRemapToPalette(gSmackerObject, palcastname, palname)
- if not (res = 0) then
- set killmeflag to 1
- else
- set ClickLockout to 0
- SmackSetInterfaceKeys(gSmackerObject, "\m")
- cursor(4)
- SmackPlay(gSmackerObject)
- cursor(0)
- if not ClickLockout then
- set keyhittostopmovie to SmackGetLastKey(gSmackerObject)
- set MouseclickX to SmackGetMouseClickX(gSmackerObject)
- set MouseclickY to SmackGetMouseClickY(gSmackerObject)
- case keyhittostopmovie of
- "\m":
- set myreturn to list(#mouse, MouseclickX, MouseclickY)
- end case
- end if
- end if
- else
- set killmeflag to 1
- end if
- end if
- set myfile to 0
- SmackClose(gSmackerObject)
- set gSmackerObject to 0
- set the soundKeepDevice to 1
- end
-